
/**
 * tanyaowu:此段代码是几年前摘自网上，网址已经找不到了
 */
(function() {
	var initializing = false, fnTest = /xyz/.test(function() {
				//xyz;
			}) ? /\b_super\b/ : /.*/;
	this.tt.C = function() {
	};
	tt.C.ext = function(prop) {
		var _super = this.prototype;
		initializing = true;
		var prototype = new this();
		initializing = false;
		for (var name in prop) {
			prototype[name] = typeof prop[name] == "function"
					&& typeof _super[name] == "function"
					&& fnTest.test(prop[name]) ? (function(name, fn) {
				return function() {
					var tmp = this._super;
					this._super = _super[name];
					var ret = fn.apply(this, arguments);
					this._super = tmp;
					return ret;
				};
			})(name, prop[name]) : prop[name];
		}
		function _c() {
			// 在类的实例化时，调用原型方法init
			if (!initializing && this.init){this.init.apply(this, arguments);}
				
		}
		_c.prototype = prototype;
		_c.constructor = _c;
		_c.ext = arguments.callee;
		return _c;
	};
})();
